www.gusucode.com > 环保时代家庭财务管理系统 EPffms v4.0 > 环保时代家庭财务管理系统 EPffms v4.0\code\eptimehome\zhanghu.asp

    <!-- #include file="conn.asp" -->
<%
'****************************************************
'Code for EptimeFFMS
'Vision : v4.0
'****************************************************
%>
<html>
<head>
<title><%=sitename%>-帐户管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/admin.css" rel="stylesheet" type="text/css" />
<script src="js/common.js" type="text/javascript"></script>
<script src="images/main.js" type="text/javascript"></script>
<style>
body {
	background-color:#FFFFFF;
}
</style>
<script>
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script>
</HEAD>
<BODY>
<!--当前导航-->
<script type="text/JavaScript">if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='首页&nbsp;&raquo;&nbsp;帐户管理&nbsp;&raquo;&nbsp;帐户列表';</script>
<% 
nowtype=request("type")
%>
<table width="95%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
  <tr> 
    <td width="25%" height="30">&nbsp;</td>
	<td width="75%" align="right">
	  类型:
	  <select name="type" onChange="form2.submit()">
	    <option value="">全部帐户</option>
		<option value="0"<%if nowtype="0" then%> selected="selected"<%end if%>>固定资产账户</option>
		<option value="1"<%if nowtype="1" then%> selected="selected"<%end if%>>现金账户</option>
		<option value="2"<%if nowtype="2" then%> selected="selected"<%end if%>>储蓄账户</option>
		<option value="3"<%if nowtype="3" then%> selected="selected"<%end if%>>信用卡账户</option>
	    <option value="4"<%if nowtype="4" then%> selected="selected"<%end if%>>借贷账户</option>
		<option value="5"<%if nowtype="5" then%> selected="selected"<%end if%>>投资账户</option>
		<option value="6"<%if nowtype="6" then%> selected="selected"<%end if%>>其他账户</option>
      </select>&nbsp;
	</td>
  </tr>
</form>
</table>
<table width="95%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr>
<td><img src="images/r_1.gif" alt="" /></td>
<td width="100%" background="images/r_0.gif">
  <table cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td>&nbsp;帐号管理</td>
	  <td align="right">&nbsp;</td>
    </tr>
  </table>
</td>
<td><img src="images/r_2.gif" alt="" /></td>
</tr>
<tr>
<td></td>
<td>
<form name="form1" action="zhanghu_del.asp">
<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
  <tr align="center">
    <td height="30" class="category">帐号类型</td>
	<td class="category">帐号名称</td>
	<td class="category">创建日期</td>
	<td class="category">期初(创建时)金额</td>
	<td class="category">当前余额</td>
	<td class="category">备注</td>
	<td width="15%" class="category">修改</td>
    <td width="5%" class="category">删除</td>
  </tr>
  <%
  if nowtype="" then
    sql="select * from Eptime_zhanghu order by type,id"
  else
    sql="select * from Eptime_zhanghu where type="&nowtype&" order by id"
  end if
  set rs_zhanghu=conn.execute(sql)
  do while rs_zhanghu.eof=false
  %>
  <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
    <td align="center" height="25"><%if rs_zhanghu("type")=0 then%>固定资产账户<%ElseIf rs_zhanghu("type")=1 then%>现金账户<%ElseIf rs_zhanghu("type")=2 then%>储蓄账户<%ElseIf rs_zhanghu("type")=3 then%>信用卡账户<%ElseIf rs_zhanghu("type")=4 then%>借贷账户<%ElseIf rs_zhanghu("type")=5 then%>投资账户<%ElseIf rs_zhanghu("type")=6 then%>其他账户<%end if%></td>
    <td align="center"><%=rs_zhanghu("name")%></td>
	 <td align="center"><%=rs_zhanghu("date")%></td>
	  <td align="right"><%=formatnumber(rs_zhanghu("amount0"),2)%></td>
	  <td align="right"><font color="red"><%=formatnumber(rs_zhanghu("amount"),2)%></font> [<a href="zhanghu_list.asp?id=<%=rs_zhanghu("id")%>">对账</a>]</td>
	  <td align="center"><%=rs_zhanghu("beizhu")%></td>
	<td align="center"><a href="zhanghu_modi.asp?id=<%=rs_zhanghu("id")%>"><img src="images/res.gif" border="0" hspace="2" align="absmiddle"></a></td>
    <td align="center"><input type="checkbox" name="ID" value="<%=rs_zhanghu("id")%>" style="border:0"></td>
  </tr>
  <%
    rs_zhanghu.movenext
  loop
  %>
<%
set count_amount = server.createobject("ADODB.RecordSet")	
count_amount.open sql,conn,1,3
nowprice=0
do while count_amount.eof=false
    nowprice=nowprice+count_amount("amount")
  count_amount.movenext
Loop
%>
  <tr align="center">
    <td height="30" class="category">合计</td>
	<td class="category" colspan="3"></td>
	<td class="category"><b><%=formatnumber(nowprice,2)%></b></td>
	<td class="category" colspan="3"></td>
  </tr>
  <tr>
    <td colspan="7" height="30" class="category">
	<table cellpadding=0 cellspacing=0 width="100%">
	<tr>
	<td align="left" style="color:#FF0000;">&nbsp;</td>  
	<td align="right">

	<input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0"> 全选
	<input type="submit" value="删 除" class="button" onClick="return confirm('警告:删除账户是一种非常危险的操作!该操作将会删除所有与账户相关的数据,如收支流水账、转账记录、借贷记录等,请慎重操作! \n\n确定要删除此帐户吗?')">

  </td>
  </tr></table></td></tr>   
</table>
</form>
</td>
<td></td>
</tr>
<tr>
<td><img src="images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="images/r_3.gif" alt="" /></td>
</tr>
</table>
</body>
</html>